<h1>Attendant Records of Session ${session.id}</h1>
<#if session.attendants?has_content>
<form method="post" action="${currentPath}">
<table>
	<thead>
		<tr>
			<th>Id</th>
			<th>Student Id</th>
			<th>Student Name</th>
			<th>Status</th>
		</tr>
	</thead>
	<tbody>
		<#list session.attendants as attendant>
			<tr>
				<td>${attendant.id}</td>
				<td>${attendant.student.id}</td>
				<td>${attendant.student.firstName} ${attendant.student.lastName}</td>
				<td>
					<select name="ids">	
						<option <#if attendant.status == 0>selected="selected"</#if> value="${attendant.id}-0" >Presence</option>
						<option <#if attendant.status == 1>selected="selected"</#if> value="${attendant.id}-1" >Absence with permission</option>
						<option <#if attendant.status == 2>selected="selected"</#if> value="${attendant.id}-2" >Absence</option>
					</select>
					
				</td>
			</tr>
		</#list>
	</tbody>
</table>
	<#if credentials.isAdmin || credentials.isLecturer || credentials.isTutor>
	<p>
		<input type="submit" value="Submit" />
	</p>
	</#if >
</form>
<#if credentials.isAdmin || credentials.isLecturer>
<p>
<a href="#">Upload List of Records</a>
</p>
</#if>
<#else>
<h2>There is no attendant records for you.</h2>
</#if>

